<?php
if(!defined("_access") || _access!=1) die('禁止访问');
?>
    <nav class="top-bar" data-topbar="">
        <ul class="title-area">
            <li class="name">
                <h1><a href="./index.php">中国矿业大学网络安全实训平台</a></h1> 
            </li>
            <li class="toggle-topbar menu-icon"><a href="./#">菜单</a>
            </li>
        </ul>
        <section class="top-bar-section">
            <!-- Right Nav Section -->
            <ul class="right">
                <li><a href="./register.php">注册</a></li>
                <li id="li-login" class="not-click">
                    <?php 
                        if(isset($teamInfo['name'])){
                            ?>
                            <script>$('#li-login').addClass('has-dropdown');</script>
                            <a href="javascript:;"><?php echo $teamInfo['name'];?></a><?php
                        } else {
                            ?><a href="login.php">登录</a><?php
                        }
                    ?>
                    <ul class="dropdown">
                        <li class="title back js-generated">
                            <h5><a href="javascript:void(0)">Back</a></h5>
                        </li>
                        <li class="parent-link show-for-small">
                            <?php 
                                if(isset($teamInfo['name'])){
                                    ?><a class="parent-link js-generated" href="javascript:;"><?php echo $teamInfo['name'];?></a><?php
                                } else {
                                    ?><a class="parent-link js-generated" href="login.php">登录</a><?php
                                }
                            ?>
                        </li>
                        <!--
                        <li><a href="./team/926">队伍</a>
                        </li>
                        <li><a href="./profile">设置</a>
                        </li>-->
                        <li><a href="./center.php">个人中心</a>
                        <li><a href="./logout.php">注销</a>
                        </li>
                    </ul>
                </li>
            </ul>
            <!-- Left Nav Section -->
            <ul class="left">
                <!--<li><a href="./rule">规则</a></li>-->
                <li><a href="./notice.php">通知公告</a></li>
                <li><a href="./teams.php">参赛队伍</a></li>
                <li><a href="./radio.introduce.php">基础题</a></li>
                <li><a href="./challenges.php">挑战赛题</a></li>
                <li><a href="./scoreboard.php">积分榜</a></li>
                <li><a href="./current.php">实时战况</a></li>
            </ul>
        </section>
    </nav>